<template>
	<view class="">
		<cu-custom bgColor="bg-cyan" isBack>
			<block slot="content">switch开关选择器</block>
		</cu-custom>
		<view class="smart-padding-wrap">
			<view class="text">
				默认样式
			</view>
			<view class="">
				<switch checked="true" @change="switchChange" />
				<switch @change="switch2Change" />
			</view>
			<view class="text">
				Checkbox类型
			</view>
			<view class="">
				<switch type="checkbox" />
			</view>
			<view class="uni-title">
				不同颜色和尺寸的switch
			</view>
			<view class="">
				<switch checked="true" @change="switchChange" style="transform: scale(0.7);" color="#0055ff" />
				<switch checked="true" @change="switch2Change" style="transform: scale(0.7);" color="#0055ff" />
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		methods: {
			switchChange(e) {
				console.log(`switch发生change事件，携带值为${e.detail.value}`);
			},
			switch2Change(e) {
				console.log(`switch2发生change事件，携带值为${e.detail.value}`);
			}
		}
	}
</script>

<style>
</style>
